Conventionally, in machine tools or the like, a position detecting device for detecting a position created by the rotational movement or linear movement of a movable body is used. One type of known position detecting device is provided with a medium/media where magnetic signals are recorded and a magnetic sensor, and the magnetic sensor can output a signal indicating a relative positional relationship between a medium and the magnetic sensor.
One known magnetic sensor used in such a position detecting device is a multilayer body having a free layer and a magnetization pinned layer and provided with a magnetoresistive effect element (MR element) where resistance is changed in association with a magnetization direction of the free layer according to an external magnetic field. Further, known media used in such a position detecting device include, for example, one having a track for absolute signals, one having a track for incremental signals, one having a track for absolute signals and a track for incremental signals.
Conventionally, one magnetic sensor used for the position detecting device provided with the medium having a track for absolute signals and a track for incremental signals has two types of MR elements: an MR element for detecting a magnetic signal recorded in the track for absolute signals and an MR element for detecting a magnetic signal recorded in the track for incremental signals is proposed (see Patent Literature 1).